package com.example;

public class Book {
    /* 不手动设置id值，程序自动自增 */
    private int id;

    public Book() {
        this.id = BookTest.index + 1;
        BookTest.index ++;
    }
    /*public Book(int id) {
        this.id = id;
    }*/
    public int getId() {
        return id;
    }
    public void setId(int id) {
        this.id = id;
    }
}
